package com.qf.day12;

/**
 * @author wgy
 * @version V1.0
 * @Project day12
 * @Package com.qf.day12
 * @Description: ${TODO}
 * @Date 2021/6/2 9:37
 */
public class Cat extends Animal {
    /**
     * 爱好
     */
    private String hobby;
    public Cat(){

    }

    public Cat(String breed, int age, String sex, String hobby) {
        super(breed, age, sex);
        this.hobby = hobby;
    }

    public String getHobby() {
        return hobby;
    }

    public void setHobby(String hobby) {
        this.hobby = hobby;
    }

    public void play(){
        System.out.println("猫咪玩毛线");
    }

    @Override
    public void eat() {
        System.out.println("猫咪小口吃小鱼");
    }

    @Override
    public void show() {
        System.out.println("猫咪信息: 品种:"+super.getBreed()+" 年龄:"+super.getAge()+" 性别:"+super.getSex()+" 爱好:"+this.hobby);
    }
}
